package store

import (
	"cgs-server/server/model"
	"go.mongodb.org/mongo-driver/bson"
)

type WorkflowStore interface {
	// Save 保存工作流
	Save(mdl *model.Workflow, user *model.User) error

	// Get 根据 fileId 查找工作流
	Get(mdl *model.Workflow, user *model.User) (*model.Workflow, error)

	// Update 更新 工作流
	Update(mdl *model.Workflow, user *model.User) error

	// Delete 删除工作流
	Delete(mdl *model.Workflow, user *model.User) error

	// List 列表
	List(mdl *model.DataUserModel) ([]*model.Workflow, error)

	Count(filter bson.M) (int64, error)
}
